package com.jiudaoliu.homeprototype.service.impl;

import com.jiudaoliu.homeprototype.POJO.VO.CommonVO;
import com.jiudaoliu.homeprototype.entity.SourceTypeEntity;
import com.jiudaoliu.homeprototype.repository.SourceTypeRepository;
import com.jiudaoliu.homeprototype.service.SourceTypeServie;
import com.jiudaoliu.homeprototype.utils.CommonVO_Utils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @Package com.jiudaoliu.homeprototype.service.impl
 * @Description:
 * @Author 陈建
 * @Create: 2018-09-20 13:21
 * @Version 1.0
 * @Update: message
 */
@Service
@Transactional
public class SourceTypeServieImpl implements SourceTypeServie {


    @Autowired
    private SourceTypeRepository sourceTypeRepository;

    @Override
    public CommonVO findAllType() {
        List<SourceTypeEntity> list = sourceTypeRepository.findAll();
        return CommonVO_Utils.success(list);
    }
}
